/*
 * Copyright 2011-2020 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0.
 * See `LICENSE` in the project root for license information.
 */

package me.ijleex.platform.system.admin.entity;

import org.apache.ibatis.type.Alias;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.base.MoreObjects;

import me.ijleex.platform.framework.entity.EntitySupport;

/**
 * 系统管理员 t_sys_admin
 *
 * @author liym
 * @since 2019-03-14 11:03:53 By 'codegen'
 */
@Alias("Admin")
public class Admin extends EntitySupport {

    /** ID */
    private Long id;
    /** 登录名 */
    private String loginId;
    /** 管理员姓名 */
    private String name;
    /** 电子邮箱 */
    private String email;
    /** 手机号码 */
    private String mobileNo;
    /** 固定电话 */
    private String telNo;

    /** 密码（Hash） */
    private String password;
    /** 密码Hash随机数 */
    private String passwdSalt;
    /** 密码Hash算法 如 SHA3-256 */
    private String passwdHashAlg;

    /** 备注 */
    private String remarks;
    /** 状态 0-正常 1-禁用 */
    private Integer state;

    public Admin() {
    }

    public Admin(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLoginId() {
        return loginId;
    }

    public void setLoginId(String loginId) {
        this.loginId = loginId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMobileNo() {
        return mobileNo;
    }

    public void setMobileNo(String mobileNo) {
        this.mobileNo = mobileNo;
    }

    public String getTelNo() {
        return telNo;
    }

    public void setTelNo(String telNo) {
        this.telNo = telNo;
    }

    @JsonIgnore
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @JsonIgnore
    public String getPasswdSalt() {
        return passwdSalt;
    }

    public void setPasswdSalt(String passwdSalt) {
        this.passwdSalt = passwdSalt;
    }

    @JsonIgnore
    public String getPasswdHashAlg() {
        return passwdHashAlg;
    }

    public void setPasswdHashAlg(String passwdHashAlg) {
        this.passwdHashAlg = passwdHashAlg;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("id", this.id)
                .add("loginId", this.loginId)
                .add("name", this.name)
                .add("email", this.email)
                .add("mobileNo", this.mobileNo)
                .add("telNo", this.telNo)
                .add("state", this.state)
                .toString();
    }

}
